Skip to content

Dogfood -Zno-embed-metadata in the compiler #145343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 13, 2025

Trying what will it break...

r? @ghost

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 13, 2025
@Kobzol
Copy link
Member Author

Kobzol commented Aug 13, 2025

@bors try

rust-bors bot added a commit that referenced this pull request Aug 13, 2025
Dogfood `-Zno-embed-metadata` in the compiler
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Aug 13, 2025

☀️ Try build successful (CI)
Build commit: 6edf4f5 (6edf4f50158d893f8aa51ea5a04ba02370776b95, parent: b1b26b834d85e84b46aa8f8f3ce210a1627aa85f)

@Kobzol
Copy link
Member Author

Kobzol commented Aug 13, 2025

@rust-timer build 6edf4f5

@rust-timer

This comment has been minimized.

@Kobzol Kobzol force-pushed the dogfood-z-no-embed-metadata branch from 74ef778 to ce49790 Compare August 13, 2025 14:27
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
diff of stderr:

9    | |_^
10    |
11    = note: the lang item is first defined in crate `std` (which `E0152_duplicate_lang_items` depends on)
-    = note: first definition in `std` loaded from SYSROOT/libstd-*.rmeta
+    = note: first definition in `std` loaded from $BUILD_DIR/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-ac18314434b3b623.rmeta
13    = note: second definition in the local crate (`E0152_duplicate_lang_items`)
14 
15 error: aborting due to 1 previous error

Note: some mismatched output was normalized before being compared
-    = note: first definition in `std` loaded from /checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-ac18314434b3b623.rmeta
---
To only update this specific test, also pass `--test-args error-codes/E0152-duplicate-lang-items.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/error-codes/E0152-duplicate-lang-items.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/error-codes/E0152-duplicate-lang-items" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0152]: found duplicate lang item `panic_impl`
##[error]  --> /checkout/tests/ui/error-codes/E0152-duplicate-lang-items.rs:16:1
   |
LL | / fn panic_impl(info: &PanicInfo) -> ! {
LL | |     //~^ ERROR: found duplicate lang item `panic_impl`
LL | |     //~| NOTE first defined in crate `std`
LL | |     loop {}
LL | | }
   | |_^
   |
   = note: the lang item is first defined in crate `std` (which `E0152_duplicate_lang_items` depends on)
   = note: first definition in `std` loaded from /checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-ac18314434b3b623.rmeta
   = note: second definition in the local crate (`E0152_duplicate_lang_items`)

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0152`.
------------------------------------------
---
diff of stderr:

5    | ^^^^^^^^^^^^^^^^^
6    |
7    = note: the lang item is first defined in crate `alloc` (which `std` depends on)
-    = note: first definition in `alloc` loaded from SYSROOT/liballoc-*.rmeta
+    = note: first definition in `alloc` loaded from $BUILD_DIR/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-613549e09f71f717.rmeta
9    = note: second definition in the local crate (`E0152`)
10 
11 error: aborting due to 1 previous error

Note: some mismatched output was normalized before being compared
-    = note: first definition in `alloc` loaded from /checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-613549e09f71f717.rmeta
---
To only update this specific test, also pass `--test-args error-codes/E0152.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/error-codes/E0152.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/error-codes/E0152" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0152]: found duplicate lang item `owned_box`
##[error]  --> /checkout/tests/ui/error-codes/E0152.rs:5:1
   |
LL | struct Foo<T>(T); //~ ERROR E0152
   | ^^^^^^^^^^^^^^^^^
   |
   = note: the lang item is first defined in crate `alloc` (which `std` depends on)
   = note: first definition in `alloc` loaded from /checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-613549e09f71f717.rmeta
   = note: second definition in the local crate (`E0152`)
---
diff of stderr:

5    | ^^^^^^^^^^^^^^
6    |
7    = note: the lang item is first defined in crate `core` (which `std` depends on)
-    = note: first definition in `core` loaded from SYSROOT/libcore-*.rmeta
+    = note: first definition in `core` loaded from $BUILD_DIR/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-b49d49c95d9ada77.rmeta
9    = note: second definition in the local crate (`duplicate`)
10 
11 error: aborting due to 1 previous error

Note: some mismatched output was normalized before being compared
-    = note: first definition in `core` loaded from /checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-b49d49c95d9ada77.rmeta
---
To only update this specific test, also pass `--test-args lang-items/duplicate.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lang-items/duplicate.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/lang-items/duplicate" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0152]: found duplicate lang item `sized`
##[error]  --> /checkout/tests/ui/lang-items/duplicate.rs:5:1
   |
---
diff of stderr:

7    | |_^
8    |
9    = note: the lang item is first defined in crate `std` (which `panic_handler_std` depends on)
-    = note: first definition in `std` loaded from SYSROOT/libstd-*.rmeta
+    = note: first definition in `std` loaded from $BUILD_DIR/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-ac18314434b3b623.rmeta
11    = note: second definition in the local crate (`panic_handler_std`)
12 
13 error: aborting due to 1 previous error

Note: some mismatched output was normalized before being compared
-    = note: first definition in `std` loaded from /checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-ac18314434b3b623.rmeta
---
To only update this specific test, also pass `--test-args panic-handler/panic-handler-std.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/panic-handler/panic-handler-std.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/panic-handler/panic-handler-std" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0152]: found duplicate lang item `panic_impl`
##[error]  --> /checkout/tests/ui/panic-handler/panic-handler-std.rs:8:1
   |
LL | / fn panic(info: PanicInfo) -> ! { //~ ERROR found duplicate lang item `panic_impl`
LL | |     loop {}
LL | | }
   | |_^
   |
   = note: the lang item is first defined in crate `std` (which `panic_handler_std` depends on)

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6edf4f5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.7% [0.2%, 1.2%] 7
Regressions ❌
(secondary)
0.4% [0.1%, 0.9%] 43
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.5%, -0.0%] 3
All ❌✅ (primary) 0.7% [0.2%, 1.2%] 7

Max RSS (memory usage)

Results (primary -0.7%, secondary -0.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.3% [1.3%, 1.3%] 1
Regressions ❌
(secondary)
2.7% [2.3%, 3.2%] 4
Improvements ✅
(primary)
-1.4% [-2.3%, -0.5%] 3
Improvements ✅
(secondary)
-2.5% [-5.2%, -0.8%] 8
All ❌✅ (primary) -0.7% [-2.3%, 1.3%] 4

Cycles

Results (primary 3.6%, secondary 3.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.6% [3.6%, 3.6%] 1
Regressions ❌
(secondary)
3.7% [2.0%, 5.3%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.6% [3.6%, 3.6%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 464.328s -> 465.28s (0.21%)
Artifact size: 377.44 MiB -> 377.37 MiB (-0.02%)

@rustbot rustbot added the perf-regression Performance regression. label Aug 13, 2025
@bors
Copy link
Collaborator

bors commented Aug 14, 2025

☔ The latest upstream changes (presumably #145366) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants